<%@page contentType="text/html;charset=utf-8"%>
<%@include file="../../core/common.jsp"%>
<html>
<head>
<title></title>
</head>
<body>
	<div class="easyui-panel" data-options="fit:true,border:false,footer:'#fb'">
		<ul id="tt" class="easyui-tree" data-options="url:'${CTX}/mgt/sys/role/role/tree/${param.id}',checkbox:true"></ul>
	</div>
	<div id="fb">
		<a id="save" class="form-btn success">确定</a>
	</div>
</body>
<script>
	$(function() {
		$('#save').click(function() {
			$.mask();
			$.ajax({
				url : '${CTX}/mgt/sys/role/role',
				data : {
					id : "${param.id}",
					roleIds : $('#tt').tree('getCheckedId')
				},
				success : function(data) {
					$.unmask();
					$.handle(data, function() {
						$.close();
					});
				}
			});
		});
	});
</script>
</html>